package cn.edu.sptc.chensiyi.hellospring.controller;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/rest")
public class RestRequestController {

    @GetMapping("/api100")
    public String api100(){
        return "api100";
    }

    @GetMapping("/api101/{uid}")
    //通过占位符的形式，
    public String api101(@PathVariable("uid") String id){
        return "api101:"+id;
    }


    @GetMapping("/api101")
    //通过请求参数的形式
    public String api102(@RequestParam(value = "uid") String id){
        return "api102:"+id;
    }
}
